export default [
  {
    path: '/user',
    layout: false,
    routes: [{ name: '登录', path: '/user/login', component: './User/Login' }],
  },
  { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome' },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/user-list' },
      { icon: 'table', path: '/admin/user-list', component: './UserList', name: '用户管理' },
    ],
  },
  // perimission
  // { icon: 'table', path: '/permission', component: './Permission', name: 'Permission' },
  { path: '/', redirect: '/welcome' },
  { path: '*', layout: false, component: './404' },
  {
    path: '/user/center',
    name: '个人中心',
    icon: 'smile',
    component: './UserCenter',
    // https://umijs.org/docs/max/layout-menu#hideinxxx
    hideInMenu: true,
  },
];
